package psn.kiko.config.properties;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 *静态资源处理属性
 */
@ConfigurationProperties(prefix = "static.resource")
@Component
@Setter
@Getter
@ToString
public class ResourceHandlerProperties{
	/**
	 * 静态资源url模式、及对应的位置信息
	 */
	private List<ResourceHandlerLocationMapping> resourceHandlerLocationMappings;
	@Data
	public static class ResourceHandlerLocationMapping{
		/**
		 * 资源请求url模式
		 */
		private String[] resourcePatterns;
		/**
		 * 资源位置
		 */
		private String[] resourceLocations;
	}
}
